<extend name="Public/base" />
<block name="content">
<div id="content" style="min-width:800px;">
	<div id="content-header">
		<div id="breadcrumb">
			<a href="{:U('Index/index')}" title="首页" class="tip-bottom"><i
				class="icon-home"></i> 首页</a> <a href="#" class="current">{$meta_title}</a>
		</div>
	</div>
	<div class="container-fluid search-form">
			<form class="m-filter" autocomplete="off">
				<div class="clearfix">
					<a class="pull-left btn btn-success btn-filter-show" id="j-filter-show"><span class="icon-chevron-down"></span></a>
				</div>
				
				<div class="filter-box" id="j-filter-box">
					<!-- 基础信息 -->
					<div class="filter-base filter-group">
						<a class="title"><span class="icon-list"></span> 基础信息</a>
						<span class="control-group">
							<select class="form-control" style="width: 180px;" name="activity_id" id="activity_id" onchange="change_merchant(activity_id, '{:U('Shop/getActivityMerchant')}')">
								<option value=0>选择活动</option>
								<volist name="activity_list" id="vo">
									<option value='{$vo.activity_id}'>{$vo.activity_name|strip_tags}</option>
								</volist>
								{$Think.config.ACTIVITY_TTTM}
							</select>
						</span>
						<span class="control-group">
							<select class="form-control" style="width: 180px;" name="merchant_id" id="merchant_id" onchange="change_shop(activity_id,merchant_id, '{:U('Shop/getMerchantShop')}')">
								<option value=0>选择商户</option>
								<volist name="merchant_list" id="vo">
									<option value='{$vo.merchant_id}'>{$vo.merchant_name|strip_tags}</option>
								</volist>
							</select>
						</span>
						<span class="control-group">
							<select class="form-control" style="width: 180px;" name="shop_id" id="shop_id">
								<option value=0>选择店铺</option>
								<volist name="shop_list" id="vo">
									<option value='{$vo.shop_id}'>{$vo.shop_name|strip_tags}</option>
								</volist>
							</select>
						</span>
					</div>
					<!-- /基础信息 -->
					<br>
					<!-- 时间 -->
					<div class="filter-date filter-group clearfix">
						<a class="title"><span class="icon-calendar"></span> 日期筛选</a>
					  	<div class="control-group pull-left">
					    	<div class="controls">
					      		<input type="text" id="start_time" name="start_time" readonly="readonly" class="datepicker" value="{:strip_tags(I('start_time'))}" placeholder="开始时间" style="width:120px; text-align:center;" >
					    	</div>
					  	</div>
					  	<div class="control-group pull-left" style="margin-left:15px;">
					    	<div class="controls">
					      		<input type="text" id="end_time" name="end_time" readonly="readonly" class="datepicker" value="{:strip_tags(I('end_time'))}" placeholder="结束时间" style="width:120px; text-align:center;" >
					    	</div>
					  	</div>　<button type="button" id="b_time" class="btn btn-warning">清除</button>
					</div>
					<!-- /时间 -->
					<div class="clearfix btn-group">
						<a class="btn btn-success btn pull-left" id="j-filter-hide" style="margin-left:15px;"><span class="icon-chevron-up"></span></a>
						<button type="button" id="search_button" url="{:U('Service/shop')}" class="btn btn-primary btn pull-left"><span class="icon-search"></span></button>
					</div>	
				</div>		
			</form>
	</div>
	
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-content">
							<table id="config_table" class="table table-bordered table-striped with-check">
								<thead>
									<td rowspan="2" class="taskStatus" style="width:100px;"><span class="taskStatus" style="font-weight:bold;color: #666666; line-height:30px;" size="3">商户</span></td>
									<td rowspan="2" class="taskStatus" style="width:100px;"><span class="taskStatus" style="font-weight:bold;color: #666666; line-height:30px;" size="3">店铺</span></td>
									<td rowspan="2" class="taskStatus"><span class="taskStatus" style="font-weight:bold;color: #666666; line-height:30px;" size="3">序号</span></td>
									<td colspan="11"><center>类型</center></td>
									<tr>
				                        <!-- <th width="7.15%" class="taskStatus">商户</th>
				                        <th width="7.15%" class="taskStatus">店铺</th>
				                        <th width="4%" class="taskStatus">序号</th> -->
				                        <th width="9.15%" class="taskStatus" style="width:100px;">{$service_type[1]|htmlspecialchars}</th>
				                        <th width="7.15%" class="taskStatus">{$service_type[2]|htmlspecialchars}</th>
				                        <th width="7.15%" class="taskStatus">{$service_type[3]|htmlspecialchars}</th>
				                        <th width="10.3%" class="taskStatus">{$service_type[4]|htmlspecialchars}</th>
				                        <th width="7.15%" class="taskStatus">{$service_type[5]|htmlspecialchars}</th>
				                        <th width="7.15%" class="taskStatus">{$service_type[6]|htmlspecialchars}</th>
				                        <th width="7.15%" class="taskStatus">{$service_type[7]|htmlspecialchars}</th>
				                        <th width="7.15%" class="taskStatus">{$service_type[8]|htmlspecialchars}</th>
				                        <th width="8.15%" class="taskStatus">{$service_type[9]|htmlspecialchars}</th>
				                        <th width="8.15%" class="taskStatus">{$service_type[12]|htmlspecialchars}</th>
				                        <th width="4%" class="taskStatus">合计</th>
									</tr>
								</thead>
								<tbody>
								<notempty name="data">
										<volist name='data' id='vo'>
						                    <tr>
						                    	<td class="taskStatus">{$vo.merchant_id|getMerchantName|htmlspecialchars}</td>
						                        <td class="taskStatus">{$vo.shop_id|getShopName|htmlspecialchars}</td>
						                        <td class="taskStatus">{$i}</td>
						                        <td class="taskStatus">{$vo['type'][1]|htmlspecialchars}</td>
						                        <td class="taskStatus">{$vo['type'][2]|htmlspecialchars}</td>
						                        <td class="taskStatus">{$vo['type'][3]|htmlspecialchars}</td>
						                        <td class="taskStatus">{$vo['type'][4]|htmlspecialchars}</td>
						                        <td class="taskStatus">{$vo['type'][5]|htmlspecialchars}</td>
						                        <td class="taskStatus">{$vo['type'][6]|htmlspecialchars}</td>
						                        <td class="taskStatus">{$vo['type'][7]|htmlspecialchars}</td>
						                        <td class="taskStatus">{$vo['type'][8]|htmlspecialchars}</td>
						                        <td class="taskStatus">{$vo['type'][9]|htmlspecialchars}</td>
						                        <td class="taskStatus">{$vo['type'][12]|htmlspecialchars}</td>
						                        <td class="taskStatus">{$vo['count']|htmlspecialchars}</td>
						                    </tr>
					                    </volist>
					                    <else/>
												<td class="taskStatus"></td>
						                        <td class="taskStatus"></td>
						                        <td class="taskStatus"></td>
						                        <td class="taskStatus"></td>
						                        <td class="taskStatus"></td>
						                        <td class="taskStatus"></td>
						                        <td class="taskStatus"></td>
						                        <td class="taskStatus"></td>
						                        <td class="taskStatus"></td>
						                        <td class="taskStatus"></td>
						                        <td class="taskStatus"></td>
						                        <td class="taskStatus"></td>
						                        <td class="taskStatus"></td>
						                        <td class="taskStatus">0</td>
										</notempty>
								</tbody>
							</table>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
$(function (){
	//日期控件
	$(".datepicker").datetimepicker({
		format: 'yyyy-mm-dd hh:ii', 
	    autoclose: true,
	    todayBtn: true
	});
	//条件框
	$("#j-filter-hide").click(function(){
		$("#j-filter-box").fadeOut(300);
		$("#j-filter-show").fadeIn(300);
	});
	$("#j-filter-show").click(function(){
		$("#j-filter-box").fadeIn(300);
		$(this).fadeOut(300);
	});
	//清除
	$('#b_time').click(function(){
		$('#start_time,#end_time').val('');
	});
	set_value("activity_id",'{:I('activity_id')}')
	set_value("merchant_id",'{:I('merchant_id')}')
	set_value("shop_id",'{:I('shop_id')}')
	
});

//导航高亮
highlight_subnav("{:U('Service/shop')}");//导航高亮
</script>
</block>